Skip to content

Commit

Permalink
CMake: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
superg committed May 25, 2024
1 parent 07a0973 commit 902104e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ jobs:

- name: CMake Configure (linux64)
if: ${{ matrix.os == 'ubuntu-24.04' }}
run: CC=clang-18 CXX=clang++-18 cmake -B ${{env.build_directory}} -G "Ninja" -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_BUILD_TYPE=${{env.build_type}} -DREDUMPER_VERSION_BUILD=${{github.run_number}} -DREDUMPER_CLANG_LINK_OPTIONS="-static"
run: CC=clang-18 CXX=clang++-18 cmake -B ${{env.build_directory}} -G "Ninja" -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DREDUMPER_CLANG_LINK_OPTIONS="-static" -DCMAKE_BUILD_TYPE=${{env.build_type}} -DREDUMPER_VERSION_BUILD=${{github.run_number}}

- name: CMake Configure (macos64)
if: ${{ matrix.os == 'macos-14' }}
run: CC=$(brew --prefix llvm@18)/bin/clang CXX=$(brew --prefix llvm@18)/bin/clang++ cmake -B ${{env.build_directory}} -G "Ninja" -DCMAKE_BUILD_TYPE=${{env.build_type}} -DREDUMPER_VERSION_BUILD=${{github.run_number}} -DREDUMPER_CLANG_LINK_OPTIONS="-L$(brew --prefix llvm@18)/lib/c++"
run: CC=$(brew --prefix llvm@18)/bin/clang CXX=$(brew --prefix llvm@18)/bin/clang++ cmake -B ${{env.build_directory}} -G "Ninja" -DREDUMPER_CLANG_LINK_OPTIONS="-L$(brew --prefix llvm@18)/lib/c++" -DCMAKE_BUILD_TYPE=${{env.build_type}} -DREDUMPER_VERSION_BUILD=${{github.run_number}}

- name: CMake Build
run: cmake --build ${{env.build_directory}} --config ${{env.build_type}}
Expand Down
16 changes: 1 addition & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
cmake_minimum_required(VERSION 3.26)
# enable scan imports in 3.28 while supporting 3.26, remove after all GitHub Actions runner images update to 3.28
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.28.0")
cmake_policy(SET CMP0155 NEW)
endif()
cmake_minimum_required(VERSION 3.28)

# project / version
set(REDUMPER_PROJECT_NAME "redumper" CACHE STRING "Project name")
Expand Down Expand Up @@ -50,16 +46,6 @@ endif()

# C/C++
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(CMAKE_VERSION VERSION_LESS "3.28.0")
set(CMAKE_CXX_EXTENSIONS OFF)
if(CMAKE_VERSION VERSION_LESS "3.27.0")
set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "2182bf5c-ef0d-489a-91da-49dbc3090d2a")
else()
set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "aa1f7df0-828a-4fcd-9afc-2dc80491aca7")
endif()
set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1)
endif()
add_definitions(-DREDUMPER_VERSION_MAJOR=${PROJECT_VERSION_MAJOR}
-DREDUMPER_VERSION_MINOR=${PROJECT_VERSION_MINOR}
-DREDUMPER_VERSION_PATCH=${PROJECT_VERSION_PATCH}
Expand Down

0 comments on commit 902104e

Please sign in to comment.