EBIvariation / vcf-validator

Validation suite for Variant Call Format (VCF) files, implemented using C++11
Apache License 2.0
129 stars 39 forks source link

improve cmake with dynamic build to have more debug symbols #169

Closed jmmut closed 4 years ago

srbcheema1 commented 5 years ago

I think FORCE keyword can also be dropped from https://github.com/EBIvariation/vcf-validator/blob/6e68167bcba5a15d64208aa8ddfee7b9c1d3508d/CMakeLists.txt#L82 as stated in cmake documentataion

Normally, set(…CACHE…) creates cache variables, but does not modify them. If FORCE is specified, the value of the cache variable is set, even if the variable is already in the cache. This should normally be avoided, as it will remove any changes to the cache variable’s value by the user.

so only set(...CACHE...) would be enough as per our requirement.

srbcheema1 commented 5 years ago

https://github.com/EBIvariation/vcf-validator/blob/a0ed5fbb98a9f96476c27f3cee244008c44eac0a/CMakeLists.txt#L90-L93

these lines could be converted into a single line.

set (CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")

It will serve the same purpose.

tcezard commented 4 years ago

Not needed: closing