Skip to content

Commit

Permalink
fix CMAKE_CXX_STANDARD (#339)
Browse files Browse the repository at this point in the history
  • Loading branch information
wkindling authored Jun 25, 2024
1 parent 6dd2b32 commit 0e7f8ea
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit 0e7f8ea

Please sign in to comment.