Board index FlightGear Support Compiling

Most recent source ignoring CMAKE_BUILD_TYPE

Building FlightGear from source, and in the need for help?

Most recent source ignoring CMAKE_BUILD_TYPE

Postby fatty » Thu May 27, 2021 7:44 pm

With the most recent source from git, I can't set the build type with -DCMAKE_BUILD_TYPE=Release; the build acts as if the options was not passed and defaults to debug mode. Using --config Release at build does not work either. Any ideas?
fatty
 
Posts: 202
Joined: Sat Jan 13, 2007 4:41 am
Location: Pennsylvania, U.S.

Re: Most recent source ignoring CMAKE_BUILD_TYPE

Postby TheEagle » Sat Jun 05, 2021 4:22 pm

Try out writing the Release in lowercase (release) and in uppercase (RELEASE) (I don't know what the cause is - I'm blindly guessing - CMake being case-sensitive is the most probable reason)
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3411
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: Most recent source ignoring CMAKE_BUILD_TYPE

Postby Bjoern » Sat Jun 12, 2021 3:14 pm

CMakeLists.txt for SimGear says:

Code: Select all
# Change the default build type to something fast
if(NOT CMAKE_BUILD_TYPE)
  set(CMAKE_BUILD_TYPE Release CACHE STRING
      "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
      FORCE)
endif(NOT CMAKE_BUILD_TYPE)


CMakeLists.txt for FlightGear says:

Code: Select all
# Set a default build type if none was specified
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
  message(STATUS "Setting build type to 'Debug' as none was specified.")
  set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE)
  # Set the possible values of build type for cmake-gui
  set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
    "MinSizeRel" "RelWithDebInfo")
endif()


And passing "-DCMAKE_BUILD_TYPE=Debug" or "-DCMAKE_BUILD_TYPE=Release" to the compiler works for me.
Bjoern
 
Posts: 484
Joined: Fri Jan 06, 2012 11:00 pm
Location: TXL (RIP)
Version: Next
OS: ArchLinux

Re: Most recent source ignoring CMAKE_BUILD_TYPE

Postby TheEagle » Sat Jun 12, 2021 4:47 pm

Please post the whole commandline; you might have got some quotes or something; also knowing your OS would be helpful :) !
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3411
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: Most recent source ignoring CMAKE_BUILD_TYPE

Postby fatty » Sun Jun 20, 2021 1:27 pm

Sorry, just seeing these responses now. I'm on Debian testing, Changing the case does not help, unfortunately. I'm just using "cmake ../fgmeta -DCMAKE_BUILD_TYPE=Release" and getting nowhere. I usually build using the regular make command, but even doing it this way "cmake --build . --config Release -- -j8" yields nothing.
fatty
 
Posts: 202
Joined: Sat Jan 13, 2007 4:41 am
Location: Pennsylvania, U.S.


Return to Compiling

Who is online

Users browsing this forum: No registered users and 6 guests