Skip to content

Commit

Permalink
Drop CXX_STANDARD_REQUIRED (handled by target_compile_features)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkewley committed Nov 1, 2024
1 parent 5f75694 commit fb1858a
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 12 deletions.
1 change: 0 additions & 1 deletion apps/hellotriangle/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ add_executable(hellotriangle
)
set_target_properties(hellotriangle PROPERTIES
CXX_EXTENSIONS OFF
CXX_STANDARD_REQUIRED ON
)
target_compile_features(hellotriangle PUBLIC
cxx_std_20
Expand Down
1 change: 0 additions & 1 deletion apps/osc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ add_executable(osc
)
set_target_properties(osc PROPERTIES
CXX_EXTENSIONS OFF
CXX_STANDARD_REQUIRED ON
)
target_compile_features(osc PUBLIC
cxx_std_20
Expand Down
3 changes: 0 additions & 3 deletions src/OpenSimCreator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,6 @@ add_library(OpenSimCreator STATIC
)
set_target_properties(OpenSimCreator PROPERTIES
CXX_EXTENSIONS OFF
CXX_STANDARD_REQUIRED ON
)
target_compile_features(OpenSimCreator PUBLIC
cxx_std_20
Expand All @@ -461,13 +460,11 @@ target_compile_options(OpenSimCreator PUBLIC
-Wno-array-bounds
>
)

target_compile_definitions(OpenSimCreator PRIVATE
# OpenSim's `spdlog` transitively uses a deprecated `stdext::checked_array_iterator`
$<$<CXX_COMPILER_ID:MSVC>:_SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING>
)
target_include_directories(OpenSimCreator PUBLIC

# so that the source code can `#include <OpenSimCreator/SomeModule.h>`
${CMAKE_CURRENT_SOURCE_DIR}/..
)
Expand Down
6 changes: 3 additions & 3 deletions src/oscar/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ set(OSC_RUNTIME_PERF_MEASUREMENTS_ENABLED ON

# find dependencies (usually built+installed from `third_party/`)
if (NOT ${OSC_EMSCRIPTEN})
# these libraries are either provided by emscripten later on, or aren't
# supported by the emscripten build (they're #ifdef'd out)
find_package(OpenGL REQUIRED)
find_package(glew REQUIRED CONFIG)
find_package(SDL2 REQUIRED CONFIG)
Expand Down Expand Up @@ -456,8 +458,7 @@ add_library(oscar STATIC
Utils/UID.h
Utils/UndoRedo.cpp
Utils/UndoRedo.h
# TODO: reenable once MacOS gets pmr::memory_resource support
# Utils/VariableLengthArray.h
# Utils/VariableLengthArray.h # disabled, because MacOS doesn't support `std::pmr::memory_resource`
Utils/WatchableLifetime.h

Variant/Variant.cpp
Expand All @@ -482,7 +483,6 @@ add_library(oscar STATIC

set_target_properties(oscar PROPERTIES
CXX_EXTENSIONS OFF
CXX_STANDARD_REQUIRED ON
)
target_compile_features(oscar PUBLIC
cxx_std_20
Expand Down
1 change: 0 additions & 1 deletion src/oscar_demos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ add_library(oscar_demos STATIC
)
set_target_properties(oscar_demos PROPERTIES
CXX_EXTENSIONS OFF
CXX_STANDARD_REQUIRED ON
)
target_compile_features(oscar_demos PUBLIC
cxx_std_20
Expand Down
1 change: 0 additions & 1 deletion tests/TestOpenSimCreator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ add_executable(TestOpenSimCreator
)
set_target_properties(TestOpenSimCreator PROPERTIES
CXX_EXTENSIONS OFF
CXX_STANDARD_REQUIRED ON
)
target_compile_features(TestOpenSimCreator PUBLIC
cxx_std_20
Expand Down
1 change: 0 additions & 1 deletion tests/testoscar/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ add_executable(testoscar
)
set_target_properties(testoscar PROPERTIES
CXX_EXTENSIONS OFF
CXX_STANDARD_REQUIRED ON
)
target_compile_features(testoscar PUBLIC
cxx_std_20
Expand Down
1 change: 0 additions & 1 deletion tests/testoscar_demos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ add_executable(testoscar_demos
)
set_target_properties(testoscar_demos PROPERTIES
CXX_EXTENSIONS OFF
CXX_STANDARD_REQUIRED ON
)
target_compile_features(testoscar_demos PUBLIC
cxx_std_20
Expand Down

0 comments on commit fb1858a

Please sign in to comment.