Skip to content

Commit

Permalink
Reverting check to make shorter branch comes first
Browse files Browse the repository at this point in the history
  • Loading branch information
yujincheng08 authored and vitaut committed Jun 6, 2024
1 parent 94f96d1 commit 5c445bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ function(add_module_library name)
target_compile_options(${name} PUBLIC -fmodules-ts)
endif ()

if (CMAKE_VERSION VERSION_LESS 3.28 OR NOT(CMAKE_GENERATOR STREQUAL "Ninja"))
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.28 AND CMAKE_GENERATOR STREQUAL "Ninja")
target_sources(${name} PUBLIC FILE_SET CXX_MODULES FILES ${sources})
else()
# `std` is affected by CMake options and may be higher than C++20.
get_target_property(std ${name} CXX_STANDARD)

Expand Down Expand Up @@ -105,8 +107,6 @@ function(add_module_library name)
endforeach ()
endif ()
target_sources(${name} PRIVATE ${sources})
else()
target_sources(${name} PUBLIC FILE_SET CXX_MODULES FILES ${sources})
endif()
endfunction()

Expand Down

0 comments on commit 5c445bc

Please sign in to comment.