Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background #132

Merged
merged 29 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
30b3d2b
start next PR [skip ci]
ryanmrichard Oct 20, 2023
7bb49d7
r2g?
ryanmrichard Oct 26, 2023
96d66ea
remove (now) redundant files
ryanmrichard Oct 26, 2023
0d63b39
backup [skip ci]
ryanmrichard Oct 27, 2023
a1adf24
g2g
ryanmrichard Oct 30, 2023
8e7c8fd
Merge branch 'master' into package_manager
ryanmrichard Oct 30, 2023
74528c6
updates
ryanmrichard Oct 31, 2023
4edbeff
updates for Zach conversation
ryanmrichard Oct 31, 2023
4b03e74
backup of background
ryanmrichard Nov 1, 2023
57e0ef3
Committing license headers
Nov 2, 2023
a7c34d0
backup [skip ci]
ryanmrichard Nov 2, 2023
d2011c0
Merge branch 'background' of https://github.com/CMakePP/CMaize into b…
ryanmrichard Nov 2, 2023
3750f99
backup [skip ci]
ryanmrichard Nov 2, 2023
bc5cfa3
back up [skip ci]
ryanmrichard Nov 3, 2023
e3f960f
backup [skip ci]
ryanmrichard Nov 6, 2023
93e4b12
backup [skip ci]
ryanmrichard Nov 7, 2023
4d27549
checkpoint for now
ryanmrichard Nov 10, 2023
6053271
Merge branch 'master' into background
ryanmrichard Nov 10, 2023
b649052
Delete Testing/Temporary/CTestCostData.txt
ryanmrichard Nov 10, 2023
010ef1c
Delete Testing/Temporary/LastTest.log
ryanmrichard Nov 10, 2023
8dbf62b
Committing license headers
Nov 10, 2023
a8fbe5c
now more backwards compatible
ryanmrichard Nov 10, 2023
c2fc331
Merge branch 'background' of https://github.com/CMakePP/CMaize into b…
ryanmrichard Nov 10, 2023
21dc9be
use a non-ignored name
ryanmrichard Nov 10, 2023
40f5f91
use CMake flags known to all supported versions...
ryanmrichard Nov 10, 2023
db3358f
CMake 3.14 happy now...
ryanmrichard Nov 10, 2023
2695faa
Update CMakeLists.txt
ryanmrichard Nov 13, 2023
6a0d80c
Apply suggestions from code review
ryanmrichard Nov 15, 2023
956722b
Apply suggestions from code review
ryanmrichard Nov 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ project(CMaize VERSION 1.0.0 LANGUAGES NONE)

option(BUILD_TESTING "Should we build and run the unit tests?" OFF)

# Include the fetch module and bring CMakePPLang into scope
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
# If cmake/ directory is not part of the CMAKE_MODULE_PATH, add it so we can
# find CMaize and CMakePPLang
list(FIND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" path_has_cmake)
if(${path_has_cmake} STREQUAL "-1")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
endif()

include(cpp/fetch/fetch_and_available)
set(build_testing_old "${BUILD_TESTING}")
set(BUILD_TESTING OFF CACHE BOOL "" FORCE)
Expand All @@ -13,8 +18,9 @@ cpp_fetch_and_available(
GIT_REPOSITORY https://github.com/CMakePP/CMakePPLang
)

# For projects including CMaize via FetchContent
if(NOT CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" PARENT_SCOPE) #For projects including CMaize
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" PARENT_SCOPE)
endif()
set(BUILD_TESTING "${build_testing_old}" CACHE BOOL "" FORCE)

Expand Down
30 changes: 15 additions & 15 deletions cmake/cmaize/targets/cxx_target.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ cpp_class(CXXTarget BuildTarget)
# :type: int
#
# CXX standard to use. For a given C++ standard designation, denoted as
# ``cxx_std_xx`` or "C++ xx", only provide the number, "xx" of the
# ``cxx_std_xx`` or "C++ xx", only provide the number, "xx" of the
# standard.
#
# Following the precident set forth by CMake for the ``CXX_STANDARD``
Expand All @@ -53,7 +53,7 @@ cpp_class(CXXTarget BuildTarget)
# Create the target and configure its properties so it is ready to build.
#
# .. note::
#
#
# Implements ``BuildTarget(make_target``.
#
# :param self: CXXTarget object
Expand Down Expand Up @@ -116,9 +116,9 @@ cpp_class(CXXTarget BuildTarget)
endfunction()

#[[[
# Abstracts out CMake's access level concept (public, interface, or
# Abstracts out CMake's access level concept (public, interface, or
# private).
#
#
# :param self: CXXTarget object
# :type self: CXXTarget
# :param _al_access_level: Returned access level.
Expand All @@ -137,7 +137,7 @@ cpp_class(CXXTarget BuildTarget)

#[[[
# Sets the CXX standard and other compiler features on the CMake target.
#
#
# :param self: CXXTarget object
# :type self: CXXTarget
#]]
Expand All @@ -147,13 +147,13 @@ cpp_class(CXXTarget BuildTarget)
CXXTarget(target "${self}" _scf_tgt_name)
CXXTarget(GET "${self}" _scf_cxx_std cxx_standard)

# The CXX std will always have PUBLIC access
target_compile_features(
"${_scf_tgt_name}"
PUBLIC
"cxx_std_${_scf_cxx_std}"
)

if(NOT "${_scf_cxx_std}" STREQUAL "")
# The CXX std will always have PUBLIC access
target_compile_features(
"${_scf_tgt_name}"
PUBLIC "cxx_std_${_scf_cxx_std}"
)
endif()
endfunction()

#[[[
Expand All @@ -162,7 +162,7 @@ cpp_class(CXXTarget BuildTarget)
# public and private headers to be found.
#
# .. note::
#
#
# Implements ``BuildTarget(_set_include_directories``.
#
# :param self: CXXTarget object
Expand Down Expand Up @@ -211,7 +211,7 @@ cpp_class(CXXTarget BuildTarget)
#[[[
# Set the link libraries for the target. Uses the ``depends`` list
# to determine what targets to link.
#
#
# :param self: CXXTarget object
# :type self: CXXTarget
#]]
Expand All @@ -235,7 +235,7 @@ cpp_class(CXXTarget BuildTarget)
#[[[
# Set the public headers on the target. It is set to all include files
# on this object.
#
#
# :param self: CXXTarget object
# :type self: CXXTarget
#]]
Expand Down
6 changes: 4 additions & 2 deletions docs/src/background/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ CMaize Background
.. toctree::
:maxdepth: 2

terminology
statement_of_need
other_projects
redundancy
build_phases
cmake_package_manager
statement_of_need
terminology
Loading
Loading