1 Feb 2008 08:14
Re: problem setting CMAKE_BUILD_TYPE and CMAKE_INSTALL_PREFIX
On 29/01/2008, Brandon Van Every <bvanevery@...> wrote: > On Jan 29, 2008 10:42 AM, Yogesh Marwaha <yogeshm.007@...> wrote: > > Here is new CMakeLists.txt > > ======================== > > project (eSpy) > > cmake_minimum_required (VERSION 2.4.0) > > if(NOT CMAKE_BUILD_TYPE) > > set (CMAKE_BUILD_TYPE Release) > > endif(NOT CMAKE_BUILD_TYPE) > > if(NOT CMAKE_INSTALL_PREFIX) > > set (CMAKE_INSTALL_PREFIX "/usr/local") > > endif(NOT CMAKE_INSTALL_PREFIX) > > find_package (Qt4 REQUIRED) > > add_subdirectory (eSpy) > > add_subdirectory (eSpyDLin) > > ====================== > > > > Now CMAKE_BUILD_TYPE and CMAKE_INSTALL_PREFIX are only set if not > > previously set/defined. > > Now no one should have any complaint. Right? > > CMAKE_INSTALL_PREFIX always has a default. Your command above does nothing. Yes, you are right. Sorry that i didn't checked it properly. > > Similarly, if(NOT CMAKE_BUILD_TYPE) is nonsensical. From the CMake > Useful Variables wiki entry: "Note that CMAKE_BUILD_TYPE is not > initialized with a readable value at configuration time. This is > because the user is free to select a build type at build time. Use(Continue reading)
RSS Feed