musllvm

musl and LLVM cross-toolchain build system
git clone https://git.daat.foo/repos/musllvm.git
Log | Files | Refs | README | LICENSE

CMakeLists.txt (550B)


      1 cmake_minimum_required(VERSION 3.20)
      2 project(musllvm_smoke LANGUAGES C CXX)
      3 add_executable(hello-c ../hello.c)
      4 set_target_properties(hello-c PROPERTIES C_STANDARD 99)
      5 add_executable(hello-cxx ../hello.cpp)
      6 add_executable(hello-cxx-static ../hello.cpp)
      7 set_target_properties(hello-cxx hello-cxx-static PROPERTIES CXX_STANDARD 20)
      8 target_link_options(hello-cxx-static PRIVATE -static)
      9 foreach(target hello-c hello-cxx hello-cxx-static)
     10   target_compile_options(${target} PRIVATE -pthread)
     11   target_link_options(${target} PRIVATE -pthread)
     12 endforeach()