This is an archive of the discontinued LLVM Phabricator instance.

[Polly] Fix CMake build for Visual Studio
ClosedPublic

Authored by Meinersbur on Jul 19 2015, 3:32 PM.

Details

Reviewers
grosser
Summary

Adapt the CMake build for Visual Studio 2015 RC. Set the Visual Studio specific build flags to compile without RTTI and without exceptions.

Put all Polly targets into a single "Polly" category (i.e. solution folder). Previously there was no recognizable scheme and most categories contained just one or two targets or didn't belong to any category.

Remove the polly_headers_do_not_build project. Visual Studio is capable of finding the headers itself, although they are not listed explicitly. For explicit listing, the headers should be added to the relevant target.

Query the isl_config.h macros recently added to ISL. One of it looks for the ffs (find first set), whose functionality is available in Visual Studio with _BitScanForward. Also add isl_ffs.c to the source files which contains the implementation of ffs using _BitScanForward. Also add a test for stdint.h as ISL's configure does.

Remove the /Za flag. According to Stephan T. Lavavej it is broken. See Clang devel mailing list.

Remove gitconfig.h.cmake. It is just one line which can be better generate in the CMakeLists.txt itself, just as ISL's configure does.

To successfully compile with Visual Studio 2015 RC, a one-line patch must be integrated into ISL. This will be done as soon it is available in its public repository.

Diff Detail

Event Timeline

Meinersbur updated this revision to Diff 30128.Jul 19 2015, 3:32 PM
Meinersbur retitled this revision from to [Polly] Fix CMake build for Visual Studio.
Meinersbur updated this object.
Meinersbur added a reviewer: grosser.
Meinersbur added a project: Restricted Project.
Meinersbur added subscribers: pollydev, llvm-commits.
grosser accepted this revision.Jul 20 2015, 6:05 AM
grosser edited edge metadata.

Nice.

If it is not too much work, I would probably commit the unrelated commits independently. This will make bisecting easier in case one of these changes
causes a bug that is found only later on. Also, it makes the changes easier to
understand.

This revision is now accepted and ready to land.Jul 20 2015, 6:05 AM
Meinersbur closed this revision.Jul 21 2015, 5:41 AM

Committed as r242771, r242772, r242773, r242775, r242776, r242777 and r242779

lib/CMakeLists.txt