From e80083cafaa385b7dabbee6134c96e7ae93295f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Fri, 14 Nov 2014 13:52:32 +0100 Subject: [PATCH] Add precision about cmake cache --- README.rst | 5 +++++ configs/README.txt | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 43253bef6..6d18f540d 100644 --- a/README.rst +++ b/README.rst @@ -77,6 +77,11 @@ Switching build modes in CMake is simple. For debug mode, enter at the command l cmake -D CMAKE_BUILD_TYPE:String="Debug" . +Note that, with CMake, if you want to change the compiler or its options after you already ran CMake, you need to clear its cache first, eg (using GNU find):: + + find . -iname '*cmake*' -not -name CMakeLists.txt -exec rm -rf {} + + CC=gcc CFLAGS='-fstack-protector-strong -Wa,--noexecstack' cmake . + In order to run the tests, enter:: make test diff --git a/configs/README.txt b/configs/README.txt index bab500d8d..f543002b7 100644 --- a/configs/README.txt +++ b/configs/README.txt @@ -18,7 +18,7 @@ them, you can pick one of the following methods: Or, using cmake: - rm CMakeCache.txt + find . -iname '*cmake*' -not -name CMakeLists.txt -exec rm -rf {} + CFLAGS="-I$PWD/configs -DPOLARSSL_CONFIG_FILE=''" cmake . make