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

fix CMAKE_CXX_STANDARD #339

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions units/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ if(UNITS_BUILD_SHARED_LIBRARY)
)
endif()

if(${CMAKE_CXX_STANDARD} GREATER 16)
if(CMAKE_CXX_STANDARD GREATER 16)
target_compile_definitions(units PRIVATE -DUNITS_CONSTEXPR_IF_SUPPORTED=1)
endif()
if(UNITS_INSTALL)
Expand Down Expand Up @@ -117,7 +117,7 @@ elseif(UNITS_BUILD_OBJECT_LIBRARY)
if(UNITS_DISABLE_EXTRA_UNIT_STANDARDS)
target_compile_definitions(units PUBLIC -DUNITS_DISABLE_EXTRA_UNIT_STANDARDS=1)
endif()
if(${CMAKE_CXX_STANDARD} GREATER 16)
if(CMAKE_CXX_STANDARD GREATER 16)
target_compile_definitions(units PRIVATE -DUNITS_CONSTEXPR_IF_SUPPORTED=1)
endif()
elseif(UNITS_BUILD_STATIC_LIBRARY)
Expand Down Expand Up @@ -152,7 +152,7 @@ elseif(UNITS_BUILD_STATIC_LIBRARY)
if(UNITS_DISABLE_NON_ENGLISH_UNITS)
target_compile_definitions(units PUBLIC -DUNITS_DISABLE_NON_ENGLISH_UNITS=1)
endif()
if(${CMAKE_CXX_STANDARD} GREATER 16)
if(CMAKE_CXX_STANDARD GREATER 16)
target_compile_definitions(units PRIVATE -DUNITS_CONSTEXPR_IF_SUPPORTED=1)
endif()
if(UNITS_INSTALL AND NOT UNITS_BINARY_ONLY_INSTALL)
Expand Down
Loading