Author Topic: The CMake build system  (Read 61528 times)

0 Members and 1 Guest are viewing this topic.

Offline m!m

  • 211
Re: The CMake build system
I'll take a look at it when I have the time.

 

Offline m!m

  • 211
Re: The CMake build system
I just tested setting CXXFLAGS to different values and every time the value showed up in the makefile. If you pass VERBOSE=1 to make you will see the entire command that is used for compiling a file which you can use to check if your custom flags show up in the make file.

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem, but under Tiger Parents
    • Skype
    • Steam
    • Twitter
Re: The CMake build system
It seems that I'm having problems building the project files for compilation using CMake. I use Visual Studio 2015 on Windows 10 (using the Anniversary Update). Can anyone provide a concrete step here and on Wiki?
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Full Projects:
Shattered Stars

Campaigns:
Lost in the Mist - Cyrene vs. Psamtik
FreeSpace: Reunited

Ships:
GTS Hygeia, GTT Argo, SC Raguel

Tools:
FSO TC/Game template

I've been under attack by Tiger Parents like Jennifer Pan...

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: The CMake build system
Could you explain your problem more clearly?  What steps you performed, what problem you're having?  I see that our documentation doesn't exactly hold your hand through the entire process step by step, I guess it assumes some familiarity with CMake still.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem, but under Tiger Parents
    • Skype
    • Steam
    • Twitter
Re: The CMake build system
I use Cmake-gui. I specified the Where is the source code and where to build the binaries. I clicked configure. Then, I get this:

Code: [Select]
cotire 1.7.8 loaded.
Doing configuration specific to visual studio...
Configuring Windows specific things and stuff...
Building libjpeg from source
Building zlib from source
Building libpng from source
Building lua from source
Could not find OpenAL libraries on system, using included pre-built libraries
Building jansson from source...

Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE)
Building FRED2: ON
Using text to speech: ON
Using voice recogition: ON
Building FSO tools: OFF
Building wxFRED: OFF
Fatal warnings: OFF
Configuring done

Then I click "Generate". I'm getting a message that some files aren't properly configured.
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Full Projects:
Shattered Stars

Campaigns:
Lost in the Mist - Cyrene vs. Psamtik
FreeSpace: Reunited

Ships:
GTS Hygeia, GTT Argo, SC Raguel

Tools:
FSO TC/Game template

I've been under attack by Tiger Parents like Jennifer Pan...

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: The CMake build system
Your code looks outdated, as there is nothing there about ffmpeg.  Are you attempting to configure for the latest master or some other branch, or old version?
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem, but under Tiger Parents
    • Skype
    • Steam
    • Twitter
Yes. I'm trying to configure for the latest. I'd like to keeping up the latest.
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Full Projects:
Shattered Stars

Campaigns:
Lost in the Mist - Cyrene vs. Psamtik
FreeSpace: Reunited

Ships:
GTS Hygeia, GTT Argo, SC Raguel

Tools:
FSO TC/Game template

I've been under attack by Tiger Parents like Jennifer Pan...

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Well, the latest master on Github should check for/download ffmpeg during the cmake process.  Since that didn't happen, there's something wrong/outdated with your setup.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
I ran into an error while using git bisect to investigate PR #1051.  I began with the latest master checked out which had just been built successfully.  Then I kicked off a bisection and checked out the fs2_open_3_7_4 tag, like so...

Code: [Select]
>git status
On branch master
Your branch is up-to-date with 'origin/master'.

nothing to commit, working directory clean

>git bisect start

>git bisect bad

>git fetch upstream --tags
remote: Counting objects: 486, done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 486 (delta 182), reused 177 (delta 177), pack-reused 293
Receiving objects: 100% (486/486), 122.75 KiB | 0 bytes/s, done.
Resolving deltas: 100% (252/252), completed with 129 local objects.
From github.com:scp-fs2open/fs2open.github.com
   d60b756..0e99ae7  coverity_scan -> upstream/coverity_scan
 * [new tag]         fs2_open_3_7_4_RC2 -> fs2_open_3_7_4_RC2
 * [new tag]         fs2_open_3_7_4_RC3 -> fs2_open_3_7_4_RC3
 * [new tag]         fs2_open_3_7_4_final -> fs2_open_3_7_4_final
[lots of nightly tags]

>git checkout fs2_open_3_7_4_final
warning: unable to rmdir cmake/external/cotire: Directory not empty
warning: unable to rmdir cmake/external/rpavlik-cmake-modules: Directory not empty
Checking out files: 100% (2923/2923), done.
Note: checking out 'fs2_open_3_7_4_final'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at 24a9a12... Automated 3.7.4 Final versioning commit

>git bisect good
Bisecting: a merge base must be tested
[dc708ccbbb61c6dd63307262ffe3be3794a732bb] Merge pull request #547 from Goober5000/game_level_seed

>git status
HEAD detached at dc708cc
You are currently bisecting, started from branch 'master'.
  (use "git bisect reset" to get back to the original branch)

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        cmake/

nothing added to commit but untracked files present (use "git add" to track)

Immediately after that, when trying to build, Visual Studio generates a whole bunch of this sort of error:
Quote
CUSTOMBUILD : CMake error : The source directory "<project dir>" does not appear to contain CMakeLists.txt.

CMake-gui also displays this error:
Quote
CMake Error: The source directory "<project dir>" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.

Where did CMakeLists.txt go, and why?


I have used git bisect many times successfully in the past and never encountered this error before.

 

Offline m!m

  • 211
Does CMakeLists.txt actually exist in the project directory? It was added after 3.7.4 final so at least for some of the commits there will be no CMakeLists.txt.

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Yeah, if you bisect over that long of a time range you might have to use the old method to compile again.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
...Derp, you're right. :snipe: I thought CMake had been added earlier.  Not seeing the forest for the trees.

It's compiling now.

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem, but under Tiger Parents
    • Skype
    • Steam
    • Twitter
Re: The CMake build system
Can it support VS2017?
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Full Projects:
Shattered Stars

Campaigns:
Lost in the Mist - Cyrene vs. Psamtik
FreeSpace: Reunited

Ships:
GTS Hygeia, GTT Argo, SC Raguel

Tools:
FSO TC/Game template

I've been under attack by Tiger Parents like Jennifer Pan...

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: The CMake build system
It does. VS2017 even has CMAKE support built-in (If CMAKE didn't support all of our main development platforms, we wouldn't be using it)
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline ksotar

  • 26
How can I build for OS X while on Windows? A lot of my friends somehow happens to have Macs.

 

Offline m!m

  • 211
You can't. Apple does not want anyone to use MacOS in a VM when the host system is not a Mac as well and cross-compiling probably doesn't work. Especially not if you are on Windows.

 

Offline ksotar

  • 26
:nono:
Alright then. I'll go and trash iTunes now out from my Win7, long time worth to do it.

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Well hold on now.  This is actually related to a problem I've wanted to solve for a while.   We can now kick off release builds via a Web page.  With some added options, I am wondering if we could request build sets for arbitrary forks/branches, with custom notification options (forum post, email, etc).
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline m!m

  • 211
Some time ago I expanded the nightly system to also support arbitrary test build compilation: https://github.com/scp-fs2open/fs2open.github.com/wiki/Automated-Test-Build-compilation

However, that requires push access to the main repository so only badged members can use that at the moment.

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
So, let's assume we got the ability to do custom builds of any branch on the main repo, via the web frontend writing a push, which I think is what we do now.  Theoretically then, any fork could set up the hooks so that it could be compatible with the system, and I could add supported forks to the web frontend right?  Or perhaps people could arbitrarily specify any fork repo URL they want and it would be on them to make sure it was set up?
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays