-
Notifications
You must be signed in to change notification settings - Fork 294
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Let CMake projects use the common CMake files. Enable C++11 mode (GCC…
…/clang).
- Loading branch information
1 parent
46e3acc
commit 434d133
Showing
14 changed files
with
63 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
# First, get the root of the repository. | ||
get_filename_component(ROOT_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) | ||
get_filename_component(ROOT_DIR "${ROOT_DIR}/.." ABSOLUTE) | ||
|
||
# Set the macro directory. | ||
set(CMAKE_MODULE_PATH "${ROOT_DIR}/cmake/macros") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
if ( MSVC ) | ||
include(${CMAKE_SOURCE_DIR}/cmake/compiler/msvc/settings.cmake) | ||
include("${ROOT_DIR}/cmake/compiler/msvc/settings.cmake") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
SET(CMAKE_VERBOSE_MAKEFILE ON) | ||
cmake_minimum_required (VERSION 2.6) | ||
ADD_EXECUTABLE (git_id git_id.cpp) | ||
|
||
cmake_minimum_required(VERSION 2.8) | ||
|
||
include(../../cmake/common.cmake) | ||
include(CheckPlatform) | ||
|
||
ADD_EXECUTABLE(git_id git_id.cpp) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
434d133
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For anyone wondering: even though I've managed to build them all on my Linux machine so I could test this commit, not all the tools in the contrib folder (extractor, vmap_extractor, mmap, etc) actually build nicely out of the box on *nix systems yet. But we're working on that, so stay tuned!
434d133
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An humble note of mine: I will probably need help to backport all the recent commits to Classic core when time comes because most of them are beyond my knowledge in C++.
434d133
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran into a few problems trying to install the clean WotLK master branch on my Unbuntu system last night. Here's a summary of what happend:
Making install in .
/bin/bash ../libtool --mode=install /usr/bin/install -c libACE.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libACE-5.8.3.so /usr/local/lib/libACE-5.8.3.so
/usr/bin/install: cannot create regular file '/usr/local/lib/libACE-5.8.3.so': Permission denied
make[7]: *** [install-libLTLIBRARIES] Error 1
make[6]: *** [install-am] Error 2
make[5]: *** [install-recursive] Error 1
make[4]: *** [install] Error 2
make[3]: *** [install-recursive] Error 1
make[2]: *** [dep/ACE_wrappers/ACE_Project-prefix/src/ACE_Project-stamp/ACE_Project-install] Error 2
make[1]: *** [dep/ACE_wrappers/CMakeFiles/ACE_Project.dir/all] Error 2
make: *** [all] Error 2
CMake Error at src/scriptdev2/cmake_install.cmake:72 (FILE):
file INSTALL cannot find
"/home/mangos/mangos/src/scriptdev2/scriptdev2.conf.dist.in".
Call Stack (most recent call first):
src/cmake_install.cmake:42 (INCLUDE)
cmake_install.cmake:62 (INCLUDE)
Created a post about this on the cmangos forums, too: http://cmangos.net/thread-7223.html
434d133
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BeerfishWoW The make error is normal, to say so. On a typical Linux system, a normal user can't make changes to system folders like /usr/lib, /usr/bin, etc. Sadly, as part of the core build, ACE gets build and installed, and the ACE installation part is a problem if you're running the make step as a normal user and you install to a system folder (that's why running make as sudo fixed the problem). But this has been a problem for ages now. I don't think it's worth the effort to investigate this at this point, because we're slowly replacing ACE anyway.
Also, I'm not sure what run directory you mean? I don't think I've ever had a run directory in my (C)MaNGOS installation? Can you provide some details about what you're missing?
[edit]
@cala No worries, @Stfx is backporting anyway these days 😀
434d133
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The run directory described, for example, in the CMaNGOS guide: https://github.com/cmangos/issues/wiki/Installation-Instructions. It contains the files to start the server, /home/mangos/mangos/run/bin/mangosd -c /home/mangos/mangos/run/etc/mangosd.conf. Where are the executables and conf files for *unix?
434d133
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, it appears the executables are in /usr/local/bin and the conf files in /mangos/src/mangosd and realmd. It's not where they were prior to this commit, I think.
434d133
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see. I didn't know that the guide suggested to make a directory called
run
.The executables and everything else should be installed in subfolders of the directory you pass on the command line with
CMAKE_INSTALL_PREFIX
(the run directory, as you say) when you run CMake. The executables end up in thebin
subfolder, the configuration files should be in theetc
subfolder, some libraries in alib
subfolder, etc. At least that's where they've always been on my Linux system. I haven't installed a core yet after the last few commits though.434d133
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And that's where I made a mistake. I forgot to include the CMAKE_INSTALL_PREFIX because it was so attached to ScriptDev2 in my mind. Obviously, you still need to run it to create the /run dir. My bad!
434d133
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything works as it should right now. Thank you for a job well done guys!
434d133
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@evil-at-wow I'm getting the following error when trying to install the latest version of WotLK CMaNGOS:
mangos@SNOWFALL:~/Build$ make
Scanning dependencies of target genrev
[ 0%] Building CXX object CMakeFiles/genrev.dir/src/tools/genrevision/genrevision.cpp.o
Linking CXX executable genrev
[ 0%] Built target genrev
Scanning dependencies of target revision.h
make[2]: *** [CMakeFiles/revision.h] Segmentation fault (core dumped)
make[1]: *** [CMakeFiles/revision.h.dir/all] Error 2
make: *** [all] Error 2
Any clue how I can fix this?
I've compiled and installed version 1.59 of boost. This is my CMAKE command:
cmake ../mangos -DCMAKE_INSTALL_PREFIX=../mangos/run -DPCH=1 -DDEBUG=0 -DBOOST_ROOT=/usr/local/boost_1_59_0/