Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Conversation

@nschonni
Copy link
Collaborator

DO NOT MERGE

The commits really need to be cleaned up before this can be merged.

  • Replace Make/autotools with CMake for cross platform building.
  • Loose layout based on https://code.google.com/p/cpp-library-project-template/
  • Each namespace moved to folders below src
  • Adds version information
  • Testing is invoked through CTest for now, but this only gives the full output for the specs when using the verbose flag
  • Existing test harness under the test folder all pass currently because CTest expects a non-zero exit for failures
  • Base setup for Doxygen generation, but not fully plumbed

TODO

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this end here and not at the end?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will if all the #ifndef SASS's are replaced in the other files

@nschonni
Copy link
Collaborator Author

Thanks for the feedback @QuLogic! It's been a long time since I did C building, so I appreciate the pointers.

@nschonni
Copy link
Collaborator Author

PS: @QuLogic I've started to clean and rebase here https://github.com/nschonni/libsass/tree/src-files-cleanup and will push back to this PR once finished. Feel free to PR to that branch for any improvements

@nschonni
Copy link
Collaborator Author

@QuLogic I've rebased down if you want to have another look.

I still need to add back the emscripten target though

@QuLogic
Copy link
Contributor

QuLogic commented Feb 22, 2014

BTW, you seem to have left autotools in, this time around.

@QuLogic
Copy link
Contributor

QuLogic commented Feb 22, 2014

Also, can CMake be configured to disable testing (because maybe someone doesn't want to install Ruby)?

@nschonni
Copy link
Collaborator Author

Also, can CMake be configured to disable testing (because maybe someone doesn't want to install Ruby)?

Yup, that's what i did here https://github.com/hcatlin/libsass/pull/292/files#diff-15547c54d3d4898a882b4ab7b3cee381R21

@QuLogic
Copy link
Contributor

QuLogic commented Feb 22, 2014

Also, can CMake be configured to disable testing (because maybe someone doesn't want to install Ruby)?

Yup, that's what i did here https://github.com/hcatlin/libsass/pull/292/files#diff-15547c54d3d4898a882b4ab7b3cee381R21

Ah right, for some reason, I thought I saw a REQUIRED there.

@nschonni
Copy link
Collaborator Author

@QuLogic is is better to repack the test exes with the libsass.a or just copy the file to the bin folder for dynamic loading?

@QuLogic
Copy link
Contributor

QuLogic commented Feb 22, 2014

libsass.a is static, and must be built into everything that uses it. If you had a libsass.so, then you could load it dynamically. I think CMake should take care of that stuff for you, though.

@QuLogic
Copy link
Contributor

QuLogic commented Feb 22, 2014

I see a few warnings with Doxygen 1.8.6:

Warning: Tag `SYMBOL_CACHE_SIZE' at line 40 of file Doxyfile has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
Warning: Tag `SHOW_DIRECTORIES' at line 71 of file Doxyfile has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
Warning: Tag `HTML_ALIGN_MEMBERS' at line 130 of file Doxyfile has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
Warning: Tag `USE_INLINE_TREES' at line 153 of file Doxyfile has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
Warning: doxygen no longer ships with the FreeSans font.
You may want to clear or change DOT_FONTNAME.
Otherwise you run the risk that the wrong font is being used for dot generated graphs.

@QuLogic
Copy link
Contributor

QuLogic commented Feb 22, 2014

You should try testing an out-of-source build. (Lots of CMake-using projects prefer/mandate it.)

mkdir build
cd build
cmake ..
make

Documentation, for example, ends up in the source directory instead of the build directory. I'm not sure if the full test suite works (I don't have Ruby on this computer).

@nschonni
Copy link
Collaborator Author

I see a few warnings with Doxygen 1.8.6:

👍 ran the upgrade and moved it to the build directory

- Based on https://code.google.com/p/cpp-library-project-template/
- add Doxygen config file
- Update build scripts
- add sass-spec testing through CTest
- Run CTest in verbose mode for CI
@mgreter mgreter added the Build label Dec 12, 2014
@mgreter mgreter changed the title Move files under src 2: electric boogaloo [DNM] CMake build files and directory structure Dec 29, 2014
@mgreter
Copy link
Contributor

mgreter commented Dec 30, 2014

Hey guys! Do you think this would still be a valuable addition to libsass, since we've added MSVC 2013 project files? Since MSVC 2013 is the only compiler that can compile libsass, I'm not sure if CMake would add much benefit. Currently I don't see much pain to handle all the different makefiles, since we are only adding a file to the build here and then. But we are laking a target to build a dll on MSVC currently though! So it still seems to be interesting ...

Are you guys up to rebase this to latest master? IMO it should be a bit easier and I agree that an out of source build would be better. I actually would volunteer to adjust the other build files accordingly. Shouldn't be too hard, since they are quite modular already.

@nschonni
Copy link
Collaborator Author

Yeah, I think there is still value and this should be simpler now that the Emscripten stuff has been removed. This likely needs to start from scratch as I also moved the source files in this making it painful to rebase.

PS: another good example of a cross platform lib leveraging it https://github.com/libgit2/libgit2/blob/master/CMakeLists.txt?ts=4

@am11
Copy link
Contributor

am11 commented Mar 19, 2015

👍
Another repo which has integrated CMake recently: https://github.com/neovim/neovim.

@mgreter
Copy link
Contributor

mgreter commented Jul 16, 2015

I have picked up on this work and successfully built the dll with cmake and msbuild (#1352). Bot sure if it will make it to master anytime soon, but getting the first results was rather easy! But there are still some open things, like versions and header location. Maybe somebody wants to continue from there ...

Going to close this once I can create a clean PR with my changes!

@mgreter mgreter self-assigned this Jul 16, 2015
@nschonni
Copy link
Collaborator Author

That's great @mgreter !

@mgreter mgreter mentioned this pull request Jul 20, 2015
@mgreter
Copy link
Contributor

mgreter commented Jul 20, 2015

I'm going to close this since it is superseded by #1359.

@mgreter mgreter closed this Jul 20, 2015
@nschonni nschonni deleted the move-files-under-src branch July 23, 2015 02:06
@mgreter mgreter mentioned this pull request May 1, 2020
7 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants