diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-20 19:30:15 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-20 19:30:15 +0200 |
commit | 4a610aa66ee203a2d9d97bd0e0710a1da3594eb8 (patch) | |
tree | 7ea301e4680b82f288c7ccbb1fca43db66d9eb56 /doc/userconfig-you@Clang.cmake | |
parent | 2dff88addc61164f3c189381644767dc8dd50061 (diff) |
a
Diffstat (limited to 'doc/userconfig-you@Clang.cmake')
-rw-r--r-- | doc/userconfig-you@Clang.cmake | 63 |
1 files changed, 26 insertions, 37 deletions
diff --git a/doc/userconfig-you@Clang.cmake b/doc/userconfig-you@Clang.cmake index a8867da6..3b0011f2 100644 --- a/doc/userconfig-you@Clang.cmake +++ b/doc/userconfig-you@Clang.cmake @@ -1,27 +1,28 @@ -set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "" FORCE) - -set(CMAKE_BUILD_TYPE DEBUG CACHE STRING "" FORCE) +if(FLOORMAT_WITH-COVERAGE) + set(CMAKE_BUILD_TYPE DEBUG CACHE STRING "" FORCE) + add_definitions( + -fprofile-instr-generate + -fcoverage-mapping + -mllvm -runtime-counter-relocation=true + ) + add_link_options( + -fprofile-instr-generate + -fcoverage-mapping + ) +endif() +add_compile_options(-emit-llvm) sets(STRING CMAKE_C_FLAGS "" CMAKE_C_FLAGS_DEBUG "-O0 -g -glldb" CMAKE_C_FLAGS_RELEASE "-O2 -mtune=native" ) - sets(STRING CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}" ) -set(CMAKE_C_FLAGS_DEBUG "" CACHE STRING "" FORCE) -set(CMAKE_C_FLAGS_RELEASE "-O2 -mtune=native" CACHE STRING "" FORCE) -set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}" CACHE STRING "" FORCE) -set(CMAKE_C_FLAGS "" CACHE STRING "" FORCE) -set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "" FORCE) - -add_compile_options(-emit-llvm) - add_compile_options(-fdiagnostics-color=always) # for building submodule dependencies @@ -64,36 +65,24 @@ function(fm-userconfig-src) ) add_compile_options( -Werror - -Wno-error=float-equal # Magnum, floormat - -Wno-error=sign-conversion # Magnum - -Wno-error=reserved-identifier # Magnum, SDL2 - -Wno-error=undef # SDL2 - -Wno-error=missing-variable-declarations # Corrade - -Wno-error=comma # floormat - -Wno-error=unused-parameter # floormat - -Wno-error=unused-private-field # floormat - -Wno-suggest-destructor-override # Magnum - -Wno-error=alloca # floormat + -Wno-error=float-equal + -Wno-error=comma + -Wno-error=unused-parameter + -Wno-error=unused-private-field + -Wno-error=alloca ) - if("$ENV{FLOORMAT_WITH_COVERAGE}") - add_definitions( - -fprofile-instr-generate - -fcoverage-mapping - -mllvm -runtime-counter-relocation=true - ) - add_link_options( - -fprofile-instr-generate - -fcoverage-mapping - ) - endif() -endfunction() - sets(BOOL SDL_SHARED ON SDL_STATIC OFF # speed up linking - #CORRADE_BUILD_TESTS TRUE - #MAGNUM_BUILD_TESTS TRUE + CORRADE_BUILD_TESTS TRUE + MAGNUM_BUILD_TESTS TRUE ) +if (FLOORMAT_WITH-COVERAGE) + sets(BOOL + CORRADE_BUILD_TESTS FALSE + MAGNUM_BUILD_TESTS FALSE + ) +endif() |