From 4b33d81cf8d670877f8bcef93a472907cf0fc1b3 Mon Sep 17 00:00:00 2001 From: natureh Date: Sat, 16 Apr 2011 20:54:52 +0200 Subject: [PATCH] CMakelists.txt more compliant with cmake-gui ; PROC_FORCED_LABEL removed, you have to eventually set PROC_LABEL instead --- CMakeLists.txt | 10 +++++----- COMPILE.txt | 28 ++++++++++++++-------------- Win32CMakeOptions-Sample.txt | 5 +++-- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 982ae6a76..cc81a96e0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,13 +22,13 @@ set (PROC_TARGET_NUMBER 0 CACHE STRING "Selected target processor from the list set (RTENGINE_CXX_FLAGS "-ffast-math -funroll-loops" CACHE STRING "Special compilation flags for RTEngine") #loading the processor targets list -set (PROC_LABEL "undefined") -set (PROC_FLAGS "") -if (PROC_TARGET_NUMBER GREATER 0) - include (ProcessorTargets.cmake) +include (ProcessorTargets.cmake) +set (PROC_LABEL "undefined" CACHE STRING "Target processor label, unused if PROC_TARGET_NUMBER = 0 or 2") +set (PROC_FLAGS "" CACHE STRING "Target processor related build/link flags") +if ((NOT(PROC_TARGET_NUMBER NOT EQUAL 0)) AND (NOT(PROC_TARGET_NUMBER EQUAL 2))) set (PROC_LABEL ${PROC_TARGET_${PROC_TARGET_NUMBER}_LABEL}) set (PROC_FLAGS ${PROC_TARGET_${PROC_TARGET_NUMBER}_FLAGS}) -endif (PROC_TARGET_NUMBER GREATER 0) +endif () # if it exists, the PROC_FORCED_LABEL value is loaded in PROC_LABEL to override the one of ProcessorTargets if (DEFINED PROC_FORCED_LABEL) diff --git a/COMPILE.txt b/COMPILE.txt index 3840668e8..e0833bce8 100644 --- a/COMPILE.txt +++ b/COMPILE.txt @@ -13,7 +13,7 @@ a specific processor variation of the same type (e.g. core2, athlon64, which are version on a linux platform) has not been tested. By default, no processor is specified, so Cmake/GCC will build RT for your processor (or maybe a generic processor). Developers that are providing build to -download then have to set the processor label manually (set to 'undefined' by default) with the PROC_FORCED_LABEL cmake's parameter (we assume that you know +download then have to set the processor label manually (set to 'undefined' by default) with the PROC_LABEL cmake's parameter (we assume that you know how to specify a cmake parameter). Note for developers that handle an automated build system : Mercurial is requested in order to produce the build information file, but you build system will @@ -63,11 +63,11 @@ Windows However, if you wants to upload a build, you should set some additionnal information about your processor. There are two possibilities: 1. You pickup a target processor from "ProcessorTargets.cmake": all you have to do is set the PROC_TARGET_NUMBER parameter in cmo.txt to the right target number. - If you choose the 'native' solution, you have to set the processor label manually in cmo.txt, by uncommenting and set the PROC_FORCED_LABEL + If you choose the 'native' solution, you have to set the processor label manually in cmo.txt, by uncommenting and set the PROC_LABEL parameter. Please provide a short name, like "core i5" or "athlon64" (without double quote)... processor frequency if of no use. - 2. You don't need specific processor flags, so you'll let PROC_TARGET_NUMBER set to 0, but you have to set the PROC_FORCED_LABEL parameter - in cmo.txt (don't forget to uncomment the line). Please provide a short name, like "core i5" or "athlon64" (without double quote)... processor - frequency if of no use. + 2. You don't need specific processor flags, so you'll let PROC_TARGET_NUMBER set to 0, but you have to set the PROC_LABEL parameter + in cmo.txt (don't forget to uncomment the line). Please provide a short name, like "core i5" or "athlon64" (without double quote)... + specifying the processor frequency in it is useless. Dependancies: @@ -187,7 +187,7 @@ Windows METHOD 1: Requirements: - - MinGW + MSYS (FIXME: Do we talk + - MinGW + MSYS - CMake - GTK and GTKMM development environments @@ -211,10 +211,10 @@ Windows If you wants to upload a build, you should set some additionnal information about your processor. There are two possibilities: 1. You pickup a target processor from "ProcessorTargets.cmake": all you have to do is adding "-D PROC_TARGET_NUMBER:STRING=number" to cmake's command line - If you choose the 'native' solution's number, you have to set the processor label manually by setting "-D PROC_FORCED_LABEL:STRING=procLabel" + If you choose the 'native' solution's number, you have to set the processor label manually by setting "-D PROC_LABEL:STRING=procLabel" in cmake's command line Please provide a short name, like "core i5" or "athlon64" (without double quote)... processor frequency if of no use. - 2. You don't need specific processor flags, you still have to set the PROC_FORCED_LABEL parameter (see point 1 righ above) + 2. You don't need specific processor flags, you still have to set the PROC_LABEL parameter (see point 1 righ above) - Type: mingw32-make.exe install - You'll find the compiled program in the subdirectory named like the value of CMAKE_BUILD_TYPE ("Release" in this example) @@ -233,8 +233,8 @@ Linux Compile: - Enter the root directory of the RawTherapee source tree - Type: cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./release -DBINDIR=. -DDATADIR=. -DLIBDIR=. - developers that wants to provide a build has to set the PROC_FORCED_LABEL to their processor name, e.g.: - cmake -DPROC_FORCED_LABEL:STRING=athlon64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./release -DBINDIR=. -DDATADIR=. -DLIBDIR=. + developers that wants to provide a build has to set the PROC_LABEL to their processor name, e.g.: + cmake -DPROC_LABEL:STRING=athlon64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./release -DBINDIR=. -DDATADIR=. -DLIBDIR=. - Type: make install - You find the compiled program in the release directory (you can copy it anywhere you want) @@ -258,10 +258,10 @@ Linux If you wants to upload a build, you should set some additionnal information about your processor. There are two possibilities: 1. You pickup a target processor from "ProcessorTargets.cmake": all you have to do is adding "-D PROC_TARGET_NUMBER:STRING=number" to cmake's command line - If you choose the 'native' solution's number, you have to set the processor label manually by setting "-D PROC_FORCED_LABEL:STRING=procLabel" + If you choose the 'native' solution's number, you have to set the processor label manually by setting "-D PROC_LABEL:STRING=procLabel" in cmake's command line Please provide a short name, like "core i5" or "athlon64" (without double quote)... processor frequency if of no use. - 2. You don't need specific processor flags, you still have to set the PROC_FORCED_LABEL parameter (see point 1 righ above) + 2. You don't need specific processor flags, you still have to set the PROC_LABEL parameter (see point 1 righ above) Eclipse does not do 'make install' but only 'make all' so to get the release there are 2 ways. 1. type 'make install' in the console or, @@ -289,10 +289,10 @@ Compile: If you wants to upload a build, you should set some additionnal information about your processor. There are two possibilities: 1. You pickup a target processor from "ProcessorTargets.cmake": all you have to do is adding "-D PROC_TARGET_NUMBER:STRING=number" to cmake's command line - If you choose the 'native' solution's number, you have to set the processor label manually by setting "-D PROC_FORCED_LABEL:STRING=procLabel" + If you choose the 'native' solution's number, you have to set the processor label manually by setting "-D PROC_LABEL:STRING=procLabel" in cmake's command line Please provide a short name, like "core i5" or "athlon64" (without double quote)... processor frequency if of no use. - 2. You don't need specific processor flags, you still have to set the PROC_FORCED_LABEL parameter (see point 1 righ above) + 2. You don't need specific processor flags, you still have to set the PROC_LABEL parameter (see point 1 righ above) - Type: make install - Type: ./tools/osx/make-app-bundle - You will find a RawTherapee.dmg file in release/ folder; this is the distribution release and can be run on any machine which meets the diff --git a/Win32CMakeOptions-Sample.txt b/Win32CMakeOptions-Sample.txt index 2fabe11eb..02e04f103 100644 --- a/Win32CMakeOptions-Sample.txt +++ b/Win32CMakeOptions-Sample.txt @@ -21,8 +21,9 @@ set(WITH_MYFILE_MMAP ON CACHE BOOL "Use the MMAP mechanism to speedup thumbnail # This line will let you chose the target number, and the associated processor set (PROC_TARGET_NUMBER 0 CACHE STRING "Target Processor") -# If you want to force the target processor name, uncomment the next line, and replace labelWithoutQuotes by its value -#set (PROC_FORCED_LABEL labelWithoutQuotes CACHE STRING "Target Processor label") +# If you want to force the target processor name when PROC_TARGET_NUMBER = 0 or 2, +# uncomment the next line and replace labelWithoutQuotes by its value +#set (PROC_LABEL labelWithoutQuotes CACHE STRING "Target Processor label") # Important: MinGW-w64 user may need to specify the -m32 or -m64 flag in CMAKE_CXX_FLAGS, # CMAKE_C_FLAGS and CMAKE_EXE_LINKER_FLAGS to selectect between 32/64bit build